﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page
{
    public string sql,ncontent;
    public string npic1,nlink1,ntext1,npic2,nlink2,ntext2,npic3,nlink3,ntext3,npic4,nlink4,ntext4,npic5,nlink5,ntext5;
    public string npica1, npica2, nida1, nida2;
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Redirect("shangpin_listqiantp.aspx");
        if (!IsPostBack)
        {
             
        }
    }

   
    public string CutStr(object str)
    {
        string strTmp = str.ToString();
        //     截取长度20 
        if (strTmp.Length > 28)
        {
            return strTmp.Substring(0, 26) + "... ";
        }
        else
        {
            return strTmp;
        }
    }
    public string CutStr2(object str)
    {
        string strTmp = str.ToString();
        //     截取长度20 
        if (strTmp.Length > 18)
        {
            return strTmp.Substring(0, 16) + "... ";
        }
        else
        {
            return strTmp;
        }
    }
    public string CutStr3(object str)
    {
        string strTmp = str.ToString();
        //     截取长度20 
        if (strTmp.Length > 22)
        {
            return strTmp.Substring(0, 20) + "... ";
        }
        else
        {
            return strTmp;
        }
    } 
}
